package com.cool.collect.springcode.a09;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author xiemiao
 * @description
 * @date 2023/08/31
 */
@ComponentScan("com.cool.collect.springcode.a09")
public class A09Application {
    private static final Logger log = LoggerFactory.getLogger(A09Application.class);

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(A09Application.class);

        E e = context.getBean(E.class);
        log.info("{}", e.getF1().getClass());
        log.info("{}", e.getF1());
        log.info("{}", e.getF1());
        log.info("{}", e.getF1());
        log.info("{}", "--------------------------");

        log.info("{}", e.getF2().getClass());
        log.info("{}", e.getF2());
        log.info("{}", e.getF2());
        log.info("{}", e.getF2());
        log.info("{}", "--------------------------");

        log.info("{}", e.getF3().getClass());
        log.info("{}", e.getF3());
        log.info("{}", e.getF3());
        log.info("{}", e.getF3());
        log.info("{}", "--------------------------");

        log.info("{}", e.getF4().getClass());
        log.info("{}", e.getF4());
        log.info("{}", e.getF4());
        log.info("{}", e.getF4());

        context.close();
    }
}
